{% extends 'teacher/base.html' %}
{% block title %}学生详情{% endblock %}
{% block section %}{{ section }}{% endblock %}
{% block content %}
<form class="form-horizontal" method="post">
    {% csrf_token %}
  <div class="form-group">
    <label for="name" class="col-sm-2 control-label">姓名</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="name" value="{{ stu.name }}" placeholder="学生姓名">
    </div>
  </div>
  <div class="form-group">
    <label for="age" class="col-sm-2 control-label">年龄</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="age" value="{{ stu.age }}" placeholder="学生年龄">
    </div>
  </div>
  <div class="form-group">
    <label for="sex" class="col-sm-2 control-label">性别</label>
    <div class="col-sm-4">
      <label class="radio-inline">
        <input type="radio" name="sex" value=0 {% if stu.sex == 0 %}checked{% endif %}>女
      </label>
      <label class="radio-inline">
        <input type="radio" name="sex" value=1 {% if stu.sex != 0 %}checked{% endif %}>男
      </label>
    </div>
  </div>
  <div class="form-group">
    <label for="mobile" class="col-sm-2 control-label">手机</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="mobile" value="{{ stu.mobile }}" placeholder="手机号码">
    </div>
  </div>
  <div class="form-group">
    <label for="qq" class="col-sm-2 control-label">QQ</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="qq" value="{{ stu.qq }}" placeholder="QQ号码">
    </div>
  </div>
  <div class="form-group">
    <label for="webchat" class="col-sm-2 control-label">微信</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="webchat" value="{{ stu.webchat }}" placeholder="微信账号">
    </div>
  </div>
  <div class="form-group">
    <label for="num" class="col-sm-2 control-label">身份证</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="num" value="{{ detail.num }}" placeholder="身份证号码">
    </div>
  </div>
  <div class="form-group">
    <label for="grade" class="col-sm-2 control-label">年级</label>
    <div class="col-sm-4">
      <select class="form-control" name="grade">
        <option>未填写</option>
          {% for grade in grades %}
            <option value="{{ grade.id }}" {% if stu.grade_id == grade.id %}selected{% endif %}>{{ grade.name }}</option>
          {% endfor %}
      </select>
    </div>
  </div>
  <div class="form-group">
    <label for="collage" class="col-sm-2 control-label">学院</label>
    <div class="col-sm-4">
      <input type="text" class="form-control" name="collage" value="{{ detail.collage }}" placeholder="所在学院">
    </div>
  </div>
  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button type="submit" class="btn btn-primary">保存</button>
      <button type="reset" class="btn btn-default">重置</button>
    </div>
  </div>
</form>
{% endblock %}